home *** CD-ROM | disk | FTP | other *** search
- .key -sd/S,-debug/S
-
- if not exists Make_ixemul.script
- echo "Please change first to the script's directory!"
- quit
- endif
-
- if not exists gen_glue.c
- echo "Missing gen_glue.c! Please copy it to the script's directory."
- quit
- endif
-
- if "<-sd>" EQ ""
- set lbmodel large data
- set alibnam ixemul.lib
- set asflags QUIET
- set ggflags no-baserel
- else
- set lbmodel small data
- set alibnam ixemuls.lib
- set asflags QUIET SMALLDATA 4,-2 SET BASECRT0
- set ggflags baserel
- endif
-
- if "<-debug>" EQ "-debug"
- set asflags $asflags SYMDEBUG
- endif
-
- echo "Checking for required commands. Stopping if missing.*N"
-
- failat 5
- echo noline "which : "
- which which ;stop if missing. :-)
- echo noline "copy : "
- which copy
- echo noline "delete : "
- which delete
- echo noline "execute : "
- which execute
- echo noline "join : "
- which join
- echo noline "list : "
- which list
- echo noline "type : "
- which type
- echo noline "vc : "
- which vc
- echo noline "PhxAss : "
- which PhxAss
- failat 20
-
- echo "*NCompiling $alibnam with $lbmodel model. This may take some time..."
-
- if not exists gen_glue
- vc -o gen_glue gen_glue.c
- endif
-
- copy >nil: gen_glue T:
- cd > T:cdir
- cd T:
-
- echo "*NGenerating stub sources..."
- gen_glue $ggflags
-
- echo "*NCopying support routines..."
- copy vbcc:libsrc/ixemul/support/#?.s T: quiet
-
- echo "*NAssembling stubs..."
- resident >NIL: PhxAss REMOVE
- resident `which PhxAss`
- list #?.s LFORMAT "PhxAss %s $asflags" > asm.script
- execute asm.script
-
- echo "*NJoining everything together..."
- join #?.o to $alibnam
-
- echo "*NCleaning up..."
- resident PhxAss REMOVE
- cd `type T:cdir`
- delete T:#?.s T:#?.o T:gen_glue T:cdir T:asm.script quiet
-
- unset lbmodel
- unset asflags
- unset ggflags
-
- set instto T:
-
- which >nil: ask
- if not warn
- ask "*NInstall $alibnam to vlib: (y/n)?"
- if warn
- set instto vlib:
- failat 21
- copy >nil: t:$alibnam $instto
- if not fail
- delete t:$alibnam quiet
- endif
- failat 20
- endif
- endif
-
- if exists ${instto}${alibnam}
- echo "*N*N...poooh... $alibnam can be found in ${instto}."
- else
- echo "*N*NInstallation error!"
- endif
-
- unset instto
- unset alibnam
-